<core:SET width='300'>
<core:WRAP file="pub/layout.html" placeholder="Content">

<SCRIPT language="javascript" src="include/zts_picker.js"></SCRIPT>
<script language="javascript">
    function showStartDateCalendar() {
        var day = document.FilterForm.start_day.value;
        var month = document.FilterForm.start_month.selectedIndex;
        var year = document.FilterForm.start_year.value;
        var dt = new Date();
    	if (day>=1 && month>=1 && year>=2000) dt = new Date(year,month-1,day);
    	var str_dt = dt2dtstr(dt);
    	//alert(str_dt);
    	show_calendar('setStartDate',str_dt);
    }
	function setStartDate(str_dt) {
			//alert(str_dt);
			var dt_datetime = (str_dt == null || str_dt =="" ?  new Date() : str2dt(str_dt));
			var month = dt_datetime.getMonth()+1;
			//alert(month);
			var day = dt_datetime.getDate();
            var year = dt_datetime.getYear();
            //alert(day);
            document.FilterForm.start_day.value = day;
            document.FilterForm.start_year.value = year;
            document.FilterForm.start_month.selectedIndex = month;
	}

    function showEndDateCalendar() {
        var day = document.FilterForm.end_day.value;
        var month = document.FilterForm.end_month.selectedIndex;
        var year = document.FilterForm.end_year.value;
        var dt = new Date();
    	if (day>=1 && month>=1 && year>=2000) dt = new Date(year,month-1,day);
    	var str_dt = dt2dtstr(dt);
    	show_calendar('setEndDate',str_dt);
    }
    function setEndDate(str_dt) {
			//alert(str_dt);
			var dt_datetime = (str_dt == null || str_dt =="" ?  new Date() : str2dt(str_dt));
			var month = dt_datetime.getMonth()+1;
			//alert(month);
			var day = dt_datetime.getDate();
            var year = dt_datetime.getYear();
            //alert(day);
            document.FilterForm.end_day.value = day;
            document.FilterForm.end_year.value = year;
            document.FilterForm.end_month.selectedIndex = month;
	}
</SCRIPT>

<td class="mini" width="100%" valign="top" align="left" >
	<table width="100%">
	<tr>
		<td>
			<core:include file="pub/articles/inc.topmenu.html">
		</td>
	</tr>
	<tr>
		<td>
			<div class="lightblue">Articles index</div>
		</td>
	</tr>
	<tr>
		<td>
			<form id="FilterForm" name="FilterForm" method="post" action="" runat="server">
			<core:optional for="msg">
				<span class="message" runat="server"> {$msg} </span>
			</core:optional>
			<hr class="login">

 			<!-- articles filter -->
 			<table width="100%" border="0" align="center" cellspacing="0" cellpadding="0">
 			<tr>
 				<td>
 					<table width="100%" border="0" align="center" cellspacing="1" cellpadding="2">
 					<tr>
 						<td class="textlogin" ><b>Show updates in:</b>
 						</td>
 					</tr>
 					<tr>
 						<td>
 							<table>
 							<tr>
 								<td class="textlogin" width="200"><input type="radio" name='type_recent' id="type1" value='1'>Recent:</td>
 								<td class="textlogin"><select name="recent" id="recent" style="width=300"></select></td>
 							</tr>
 							<tr>
 								<td class="textlogin" width="200">
 									<input type="radio" name='type_recent' id="type2" value='2'>Starting from date:
 								</td>
 								<td>
 									<input class='login' name="start_day" type="text" id="start_day" size="2" runat="server">
                        				<select name="start_month" id="start_month" runat="server">
                        				</select>
                       				<input class='login' name="start_year" type="text" id="start_year" size="4" runat="server">
                        				<a href="javascript:showStartDateCalendar();">
                          					<img height=20  src="images/calendar.gif" width=20 border=0 >
                        				</a>
           						</td>
 							</tr>
 							<tr>
 								<td class="textlogin" width="200">From category:</td>
 								<td class="textlogin"><select name="category1" id="category1" style="width=300"></select></td>
 							</tr>
 							<tr>
 								<td class="textlogin" width="200">And for community:</td>
 								<td class="textlogin"><select name="category2" id="category2" style="width=300"></select></td>
 							</tr>
 							<tr>
 								<td class="textlogin" width="200">Author:</td>
 								<td class="textlogin"><select name="author" id="author" style="width=300"></select></td>
 							</tr>
 							<tr>
 								<td class="textlogin" width="200">Show # of items per page:</td>
 								<td>
 									<table width="100%">
 									<tr>
 										<td class="textlogin">
 											<select name="item" id="item" style="width=100"></select>
 										</td>
 										<td align="right">
 											<input type="submit" name='articlelist' value="Search">
 										</td>
 									</tr>
 									</table>
 								</td>
 							</tr>
 							</table>
 						</td>
						<td valign="top">
							<img src="images/articlesindex.gif">
						</td>
					</tr>
					</table>
				</td>
			</tr>
 			<tr>
 				<td><hr class="login"></td>
 			</tr>
			<tr>
				<td class="textlogin" style="padding-left:20;">
				<img src='images/hot.gif' hspace="3"><b>Headlines marked with a colored ticket require a Premium Ticket subscription.<br>
					<a href="subscribe.htm" class='linklogin' style="color:blue">Click here</a> to subscribe now.</b>
				</td>
			</tr>
			<tr>
				<td><hr class="login"></td>
			</tr>
			</table>
			</form>
    	</td>
	</tr>
	<tr>
		<td>
    		<list:LIST id='articles'>
			<table width="100%" border="0" cellspacing="0" cellpadding="3">
			<tr>
				<th class="lightblue" colspan="2" align="left">Article header</th>
				<th class="lightblue" align="left">Date</th>
				<th class="lightblue" align="left">Category</th>
				<th class="lightblue" align="left">Author</th></tr>
				<list:ITEM>
				<tr>
					<td width="10">
						<core:optional for="prem" ><img src='images/hot.gif' hspace="3"></core:optional>
					</td>
					<td class="textlogin" style="font-size:12pt" width="200">&nbsp;
						<a class="articlelink" href="articles/details.htm?id={$article_id}">
						<b>{$headline}</b></a>
					</td>
					<td class="textlogin" style="font-size:11pt" width="100">
						{$date_added_formatted}
					</td>
					<td class="textlogin" style="font-size:10pt" width="160">
						<core:optional for="prem" >Premium </core:optional>
						{$category1}
						<core:optional for="category2"> - {$category2}
						</core:optional>
					</td>
					<td class="textlogin" style="font-size:11pt">
						<b>{$firstname} {$lastname}</b>
					</td>
				</tr>
				</list:ITEM>
				<tr>
					<th class="lightblue" colspan="2">Article header</th>
					<th class="lightblue">Date</th>
					<th class="lightblue">Category</th>
					<th class="lightblue">Author</th>
				</tr>
				<tr>
					<td align="right" colspan="5" class="textlogin" style="font-size:12pt;">
					<page:navigator id="pagenav" items="10">
						Page: {$PageNumber} of {$TotalPages}
    				<page:first>First</page:first>
    				<page:prev>Prev</page:prev>
    				<page:list>
       				  <page:number>
        				<page:elipses>...</page:elipses>
       					<page:separator> </page:separator>
    				</page:list>
    				<page:next>Next</page:next> <page:last>Last</page:last>
					</page:navigator>
					</td>
				</tr>
			</table>
			</list:LIST>
		</td>
	</tr>
	</table>
</td>








